#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>

int cal(int* arrary, int n)
{
	int i = 0;
	int sum = 0;

	for (i = 0; i < n; i++)
	{
		sum = *(arrary + i) + sum;
	}
	return sum;
}

int main()
{
	int n = 0;
	int i = 0;
	int sum = 0;
	scanf("%d", &n);

	int* arrary = (int*)malloc(n * sizeof(int));
	if (arrary == NULL)
	{
		return 1;
	}
	else
	{
		for (i = 0; i < n; i++)
		{
			scanf("%d", arrary + i);
		}
	}


	sum = cal(arrary, n);
	printf("%d", sum);
	free(arrary);
	arrary = NULL;

	return 0;
}